// 判断文件MIME类型
const mime = require('mime')

var img = 'xxx.png'
mime.getType(img);
mime.getExtension(img);
console.log(mime.getType(img), mime.getExtension(mime.getType(img)))
